{% extends 'iframe/basePlus.html.twig' %}
{% block cardHeader %}
    添加<a href="/Admin/Menu/index" class="layui-btn layui-btn-sm" style="float:right;margin-top:6px;">列表</a>
{% endblock %}
{% block cardBody %}
    <form class="layui-form">
        <dry-common role="select" label="父级" name="dry_parent" value="" url="/Api/Menu/getParentForNewOrEdit"></dry-common>
        <dry-common role="icon" label="ICON" name="dry_icon" value=""></dry-common>
        <dry-common role="input" label="标题" name="dry_title" value="" placeholder="请输入标题"></dry-common>
        <dry-common role="input" label="链接" name="dry_link" value="" placeholder="请输入链接"></dry-common>
        <dry-common role="input" label="备注" name="dry_note" value="" placeholder="请输入备注"></dry-common>
        <dry-common role="input" label="排序" name="dry_sort" value="0" placeholder="请输入排序"></dry-common>
        <dry-common role="switch" label="状态" name="dry_status" value="1" openText="启用" closeText="禁用" checked="auto"></dry-common>
        <dry-common role="submit" submit="确定" reset="重置"></dry-common>
    </form>
    <script>
        layui.use(["dry"], function(dry){
            function getVerify()
            {
                var result = {
                    dry_title:function(value){if(value == ""){return "请输入标题";}}
                };
                return result;
            }

            dry.submit(getVerify(), "/Admin/Menu/index", "/Api/Menu/new");
        });
    </script>
{% endblock %}